public class Java033 {
    public static void main(String[] args) {
        triangle(10);
    }
    public static void triangle(int num){

        for(int i=0;i<num;i++){
            int number =1;
            System.out.format("%"+(num-i)*2+"s"," ");
            for(int j=0;j<=i;j++){
                System.out.format("%4d",number);
                number = number * (i-j)/(j+1);
            }
            System.out.println();

        }
    }
}

